﻿using System;
using System.Html.DOM;

namespace jQueryLib
{
    public abstract partial class JQueryInstance
    {
        /// <summary>
        /// Store arbitrary data associated with the matched elements.
        /// </summary>
        /// <param name="key">A string naming the piece of data to set.</param>
        /// <param name="val">The new data value; it can be any Javascript type including Array or Object.</param>
        /// <returns></returns>
        public abstract JQueryInstance Data(string key, object val);

        /// <summary>
        /// Store arbitrary data associated with the matched elements.
        /// </summary>
        /// <param name="map">An object of key-value pairs of data to update.</param>
        /// <returns></returns>
        public abstract JQueryInstance Data(object map);

        /// <summary>
        /// Returns value at named data store for the first element in the jQuery collection, as set by data(name, value).
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        public abstract object Data(string key);

        /// <summary>
        /// Returns value at named data store for the first element in the jQuery collection, as set by data(name, value).
        /// </summary>
        /// <returns></returns>
        public abstract object Data();

        /// <summary>
        /// Remove from the queue all items that have not yet been run.
        /// </summary>
        public abstract JQueryInstance ClearQueue();

        /// <summary>
        /// Remove from the queue all items that have not yet been run.
        /// </summary>
        /// <param name="queueName">A string containing the name of the queue. Defaults to fx, the standard effects queue.</param>
        public abstract JQueryInstance ClearQueue(string queueName);

        /// <summary>
        /// Execute the next function on the queue for the matched elements.
        /// </summary>
        public abstract JQueryInstance Dequeue();

        /// <summary>
        /// Execute the next function on the queue for the matched elements.
        /// </summary>
        /// <param name="queueName">A string containing the name of the queue. Defaults to fx, the standard effects queue.</param>
        public abstract JQueryInstance Dequeue(string queueName);

        /// <summary>
        /// Show the queue of functions to be executed on the matched elements.
        /// </summary>
        /// <returns></returns>
        public abstract object[] Queue();

        /// <summary>
        /// Show the queue of functions to be executed on the matched elements.
        /// </summary>
        /// <param name="queueName">A string containing the name of the queue. Defaults to fx, the standard effects queue.</param>
        /// <returns></returns>
        public abstract object[] Queue(string queueName);

        /// <summary>
        /// Manipulate the queue of functions to be executed on the matched elements.
        /// </summary>
        /// <param name="queueName"></param>
        /// <param name="act"></param>
        /// <returns></returns>
        public abstract JQueryInstance Queue(string queueName, Action callback);

        /// <summary>
        /// Manipulate the queue of functions to be executed on the matched elements.
        /// </summary>
        /// <param name="queueName"></param>
        /// <param name="newQueue"></param>
        /// <returns></returns>
        public abstract JQueryInstance Queue(string queueName, Delegate[] newQueue);

        /// <summary>
        /// Remove all previously-stored piece of data.
        /// </summary>
        /// <returns></returns>
        public abstract JQueryInstance RemoveData();

        /// <summary>
        /// Remove a previously-stored piece of data.
        /// </summary>
        /// <param name="key">A string naming the piece of data to delete. Or space-separated string naming the pieces of data to delete.</param>
        /// <returns></returns>
        public abstract JQueryInstance RemoveData(string key);

        /// <summary>
        /// Remove a previously-stored piece of data.
        /// </summary>
        /// <param name="keys">An array naming the pieces of data to delete.</param>
        /// <returns></returns>
        public abstract JQueryInstance RemoveData(string[] keys);
    }
}
